Skip to content

feat: document transient payload passthrough in elements#2499

Open
jonas-jonas wants to merge 5 commits into
masterfrom
jonas-jonas/transientPayloadsElements
Open

feat: document transient payload passthrough in elements#2499
jonas-jonas wants to merge 5 commits into
masterfrom
jonas-jonas/transientPayloadsElements

Conversation

@jonas-jonas
Copy link
Copy Markdown
Member

Related Issue or Design Document

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

Comment thread docs/elements/guides/30_transient_payloads.mdx Outdated
Co-authored-by: Jonas Hungershausen <jonas.hungershausen@gmail.com>
Comment thread docs/elements/guides/30_transient_payloads.mdx Outdated
Comment thread docs/elements/guides/30_transient_payloads.mdx Outdated
@vinckr
Copy link
Copy Markdown
Member

vinckr commented Apr 24, 2026

is this already released?
if yes please address comments and merge, if not please add the upstream label

Co-authored-by: unatasha8 <una.cogavin@ory.sh>
Copilot AI review requested due to automatic review settings June 4, 2026 15:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Ory Elements guide explaining how to use Kratos transient payload passthrough via the transientPayload prop on self-service flow components, including static and dynamic examples.

Changes:

  • Introduces a new MDX guide page under Elements guides for transient payload passthrough.
  • Documents both static object payloads and dynamic function-based payloads with Next.js/React examples.
  • Links to the existing Ory Actions/Webhooks guide for broader webhook context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +7 to +9
Transient payload is an Ory Kratos concept, that allows users of the APIs to pass data through to webhooks. All self-service
Kratos flows support transient payloads, and they are passed through to the webhooks as JSON objects. This allows you to use the
data in your webhooks, for example to customize the user experience or to trigger specific actions based on the data.
Comment on lines +11 to +14
Ory Elements allows defining transient payloads on the self-service flow components. To do this, you can use the
`transientPayload` prop on the self-service flow components. The value of this prop should be an object that contains the data you
want to pass through to the webhooks or a function that returns such an object. The data will be passed through to the webhooks as
JSON objects.
@@ -0,0 +1,84 @@
---
id: transient-payload
title: Transient Payload passthrough

- [Read more about webhooks in Ory](../../guides/integrate-with-ory-cloud-through-webhooks.mdx)

## Static Transient Payload
}
```

## Dynamic Transient Payload
Comment on lines +56 to +58
In this example, we define a dynamic transient payload that contains the user's preferred language. The function is called when
the user submits the form and the API request is made. This allows you to pass dynamic data to the webhooks, based on the user's
input or other factors.
<Registration
flow={flow}
config={config}
transientPayload={(formValues) => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants